package com.ruoyi.common.enums;

/**
 * 社保倍数
 * @author thanks
 */
public enum SocialSecurityType {
    LOWEST(0, "最低"), PERCENT_ONE(1, "一倍"), PERCENT_TWO(2, "二倍"), PERCENT_THREE(3, "三倍");

    private final Integer code;
    private final String desc;

    SocialSecurityType(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public static SocialSecurityType getEnumByCode(Integer code) {

        if (code == null) {
            return null;
        }

        for (SocialSecurityType each : values()) {
            if (each.getCode().equals(code)) {
                return each;
            }
        }

        return null;
    }



    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
